package com.CmJava.crowd.entity;

//import javax.servlet.http.HttpServletRequest;


public class JudgeHttpUtil {
    // 判断http请求是json还是普通请求
    // HttpServletRequest需要导包javax.servlet
//    public static boolean judgeHttp(HttpServletRequest request){
//        String accept = request.getHeader("Accept");
//        String XRW = request.getHeader("X-Requested-With");
//        //  json请求的请求头符合下面的内容
//        return ((accept!=null)&&(accept.contains("application/json"))) ||
//                ((XRW!=null)&&(XRW.equals("XMLHttpRequest")));
//    }
}
